import { Form, Input, Select, Button, Row, Col } from 'antd';


const HeaderSearch = () =>{
    const { Option } = Select;

    const [form] = Form.useForm();

    const onFinish = (values) => {
        console.log(values);
    };

    const onReset = () => {
        form.resetFields();
    };

    return (
        <Form name="advanced_search" form={form} onFinish={onFinish}>
            <Row gutter={16}>
                <Col className="gutter-row" span={6}>
                    <Form.Item name={`inpVal`} label="输入查询：">
                        <Input />
                    </Form.Item>
                </Col>
                <Col className="gutter-row Col2" span={7}>
                    <Form.Item label="所在城市：" name={`selVal1`} >
                        <Select defaultValue="全部" style={{ width: 90, marginRight: 10 }}>
                            <Option value="全部">全部</Option>
                            <Option value="四川省">四川省</Option>
                            <Option value="广东省">广东省</Option>
                        </Select>
                    </Form.Item>
                    <Form.Item name={`selVal2`} >
                        <Select defaultValue="全部" style={{ width: 90 }}>
                            <Option value="全部">全部</Option>
                            <Option value="成都市">成都市</Option>
                            <Option value="深圳市">深圳市</Option>
                        </Select>
                    </Form.Item>
                </Col>
                <Col className="gutter-row" span={5}>
                    <Form.Item label="机构类型：" name={`selVal3`}>
                        <Select defaultValue="全部">
                            <Option value="全部">全部</Option>
                            <Option value="二甲医院">二甲医院</Option>
                            <Option value="三甲医院">三甲医院</Option>
                            <Option value="专门体检机构">专门体检机构</Option>
                        </Select>
                    </Form.Item>
                </Col>
                <Col className="gutter-row" span={5}>
                    <Form.Item style={{ paddingLeft:15 }}>
                        <Button type="primary" htmlType="submit" >查询</Button>
                        <Button onClick={onReset} style={{ marginLeft:15 }}>重置</Button>
                    </Form.Item>
                </Col>

            </Row>
        </Form>
    );
};

export default HeaderSearch;